package com.dly.hope.modle;

import com.dly.hope.type.RoleType;
import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author linyu.dai
 * @project myserve
 * @description 角色表
 * @creat 2022/9/28 10:28:45
 */
@Entity
@Table(name = "hope005_role")
@DynamicUpdate
@DynamicInsert

@Data
public class Role extends BaseEntity{

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;

    @Column(name = "role_name")
    @Comment(value = "角色名")
    private String roleName;

    @Column(name = "role_type")
    @Comment(value = "角色类型")
    @Enumerated(EnumType.STRING)
    private RoleType roleType;
}
